<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class named_condition</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__condition_8hpp" title="Header &lt;boost/interprocess/sync/named_condition.hpp&gt;">
<link rel="prev" href="structboost_1_1interprocess_1_1null__mutex__family.html" title="Struct null_mutex_family">
<link rel="next" href="classboost_1_1interprocess_1_1named__condition__any.html" title="Class named_condition_any">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1interprocess_1_1null__mutex__family.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__condition_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1interprocess_1_1named__condition__any.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class named_condition</span></h2>
<p>boost::interprocess::named_condition</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__condition_8hpp" title="Header &lt;boost/interprocess/sync/named_condition.hpp&gt;">boost/interprocess/sync/named_condition.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html" title="Class named_condition">named_condition</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="comment">// <a class="link" href="../boost_container_header_reference/classboost_1_1container_1_1pmr_1_1synchronized__pool__resource.html#id86-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a4101a5e6469dd571a9e73161b05d5973"><span class="identifier">named_condition</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> 
                  <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1aac3c7ed98f56441c1074b6d386e0ba95"><span class="identifier">named_condition</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> 
                  <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1af103fe3e0afddfb17f144270ca6d8897"><span class="identifier">named_condition</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3a19cc30a4d03ceb8e3842008820cdcf"><span class="identifier">named_condition</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> 
                  <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a82a9af1252dcea4200175542511bf000"><span class="identifier">named_condition</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> 
                  <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a80637f91cfb753fae0820e939a47dc82"><span class="identifier">named_condition</span></a><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1ad78388db4d8b3f8548c9dadc59bb7e40"><span class="special">~</span><span class="identifier">named_condition</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a268e039ee1e0d2112751d6ecef1c48a9"><span class="identifier">notify_one</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1eb56b18cf062faca443a4180236a033"><span class="identifier">notify_all</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a8e05f4757f262aacb8a2d77554ff379c"><span class="identifier">wait</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1c32e5291d2038bfdd5ad822776bd2cf"><span class="identifier">wait</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">Pr</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> 
    <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1ad4bd59d733c455672d9d8af4d2b74cee"><span class="identifier">timed_wait</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> 
    <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a462e56777286aaf4d79648e07a7c975b"><span class="identifier">timed_wait</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">Pr</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> 
    <span class="identifier">cv_status</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a67c267fbb39b6df44c488f31f8dd65b7"><span class="identifier">wait_until</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> 
    <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1af05bf6486877da93e0aac48da2542623"><span class="identifier">wait_until</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">Pr</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> Duration<span class="special">&gt;</span> 
    <span class="identifier">cv_status</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1ab3ef57ae164d3cebc499210a19d72886"><span class="identifier">wait_for</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Duration</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> Duration<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> 
    <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a8e54c509c896f200a082f665e07a2acc"><span class="identifier">wait_for</span></a><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Duration</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">Pr</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="../boost_container_header_reference/classboost_1_1container_1_1pmr_1_1synchronized__pool__resource.html#id87-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3daa97bf857279e0d531f162fb44407a"><span class="identifier">remove</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3a088ce9bde2322e945fd0ce313eef19"><span class="identifier">remove</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.16.19.3.67.4.4"></a><h2>Description</h2>
<p>A global condition variable that can be created by name. This condition variable is designed to work with <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html" title="Class named_mutex">named_mutex</a> and can't be placed in shared memory or memory mapped files. </p>
<div class="refsect2">
<a name="id-1.3.16.19.3.67.4.4.3"></a><h3>
<a name="id86-bb"></a><code class="computeroutput">named_condition</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a4101a5e6469dd571a9e73161b05d5973"></a><span class="identifier">named_condition</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
                <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates a global condition with a name. If the condition can't be created throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a> </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1aac3c7ed98f56441c1074b6d386e0ba95"></a><span class="identifier">named_condition</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
                <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Opens or creates a global condition with a name. If the condition is created, this call is equivalent to named_condition(create_only_t, ... ) If the condition is already created, this call is equivalent named_condition(open_only_t, ... ) Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1af103fe3e0afddfb17f144270ca6d8897"></a><span class="identifier">named_condition</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Opens a global condition with a name if that condition is previously created. If it is not previously created this function throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3a19cc30a4d03ceb8e3842008820cdcf"></a><span class="identifier">named_condition</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1create__only__t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Opens a global condition with a name if that condition is previously created. If it is not previously created this function throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a>. Creates a global condition with a name. If the condition can't be created throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a></p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a82a9af1252dcea4200175542511bf000"></a><span class="identifier">named_condition</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__or__create__t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                <span class="keyword">const</span> <a class="link" href="classboost_1_1interprocess_1_1permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Opens or creates a global condition with a name. If the condition is created, this call is equivalent to named_condition(create_only_t, ... ) If the condition is already created, this call is equivalent named_condition(open_only_t, ... ) Does not throw</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a80637f91cfb753fae0820e939a47dc82"></a><span class="identifier">named_condition</span><span class="special">(</span><a class="link" href="structboost_1_1interprocess_1_1open__only__t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Opens a global condition with a name if that condition is previously created. If it is not previously created this function throws <a class="link" href="classboost_1_1interprocess_1_1interprocess__exception.html" title="Class interprocess_exception">interprocess_exception</a>.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1ad78388db4d8b3f8548c9dadc59bb7e40"></a><span class="special">~</span><span class="identifier">named_condition</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3daa97bf857279e0d531f162fb44407a">remove()</a>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a268e039ee1e0d2112751d6ecef1c48a9"></a><span class="identifier">notify_one</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>If there is a thread waiting on <span class="emphasis"><em>this, change that thread's state to ready. Otherwise there is no effect.</em></span><span style="color: red">&lt;zwj&gt;&lt;/zwj&gt;</span>/ </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1eb56b18cf062faca443a4180236a033"></a><span class="identifier">notify_all</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Change the state of all threads waiting on *this to ready. If there are no waiting threads, <a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1eb56b18cf062faca443a4180236a033">notify_all()</a> has no effect. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a8e05f4757f262aacb8a2d77554ff379c"></a><span class="identifier">wait</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">)</span><span class="special">;</span></pre>
<p>Releases the lock on the <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html" title="Class named_mutex">named_mutex</a> object associated with lock, blocks the current thread of execution until readied by a call to this-&gt;<a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a268e039ee1e0d2112751d6ecef1c48a9">notify_one()</a> or this-&gt;<a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1eb56b18cf062faca443a4180236a033">notify_all()</a>, and then reacquires the lock. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1c32e5291d2038bfdd5ad822776bd2cf"></a><span class="identifier">wait</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="identifier">Pr</span> pred<span class="special">)</span><span class="special">;</span></pre>
<p>The same as: while (!pred()) wait(lock) </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1ad4bd59d733c455672d9d8af4d2b74cee"></a><span class="identifier">timed_wait</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span> abs_time<span class="special">)</span><span class="special">;</span></pre>
<p>Releases the lock on the <a class="link" href="classboost_1_1interprocess_1_1named__mutex.html" title="Class named_mutex">named_mutex</a> object associated with lock, blocks the current thread of execution until readied by a call to this-&gt;<a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a268e039ee1e0d2112751d6ecef1c48a9">notify_one()</a> or this-&gt;<a class="link" href="classboost_1_1interprocess_1_1named__condition.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a1eb56b18cf062faca443a4180236a033">notify_all()</a>, or until time abs_time is reached, and then reacquires the lock. Returns: false if time abs_time is reached, otherwise true. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a462e56777286aaf4d79648e07a7c975b"></a><span class="identifier">timed_wait</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span> abs_time<span class="special">,</span> <span class="identifier">Pr</span> pred<span class="special">)</span><span class="special">;</span></pre>
<p>The same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true; </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">&gt;</span> 
  <span class="identifier">cv_status</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a67c267fbb39b6df44c488f31f8dd65b7"></a><span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span> abs_time<span class="special">)</span><span class="special">;</span></pre>
<p>Same as <code class="computeroutput">timed_wait</code>, but this function is modeled after the standard library interface. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> TimePoint<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1af05bf6486877da93e0aac48da2542623"></a><span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">TimePoint</span> <span class="special">&amp;</span> abs_time<span class="special">,</span> <span class="identifier">Pr</span> pred<span class="special">)</span><span class="special">;</span></pre>
<p>Same as <code class="computeroutput">timed_wait</code>, but this function is modeled after the standard library interface. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> Duration<span class="special">&gt;</span> 
  <span class="identifier">cv_status</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1ab3ef57ae164d3cebc499210a19d72886"></a><span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Duration</span> <span class="special">&amp;</span> dur<span class="special">)</span><span class="special">;</span></pre>
<p>Same as <code class="computeroutput">timed_wait</code>, but this function is modeled after the standard library interface and uses relative timeouts. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> L<span class="special">,</span> <span class="keyword">typename</span> Duration<span class="special">,</span> <span class="keyword">typename</span> Pr<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a8e54c509c896f200a082f665e07a2acc"></a><span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">L</span> <span class="special">&amp;</span> lock<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Duration</span> <span class="special">&amp;</span> dur<span class="special">,</span> <span class="identifier">Pr</span> pred<span class="special">)</span><span class="special">;</span></pre>
<p>Same as <code class="computeroutput">timed_wait</code>, but this function is modeled after the standard library interface and uses relative timeouts </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.16.19.3.67.4.4.4"></a><h3>
<a name="id87-bb"></a><code class="computeroutput">named_condition</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3daa97bf857279e0d531f162fb44407a"></a><span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Erases a named condition from the system. Returns false on error. Never throws. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1named__condition_1a3a088ce9bde2322e945fd0ce313eef19"></a><span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Erases a named condition from the system. Returns false on error. Never throws.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005-2024 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1interprocess_1_1null__mutex__family.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.named__condition_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1interprocess_1_1named__condition__any.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
